Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Otel exporter #529

Open
wants to merge 52 commits into
base: main
Choose a base branch
from
Open

Otel exporter #529

wants to merge 52 commits into from

Conversation

teocns
Copy link
Contributor

@teocns teocns commented Nov 22, 2024

Significant performance boost for AgentOps SDK by leveraging on OpenTelemetry as an event publisher

  1. OpenTelemetry Integration
  • Added OpenTelemetry dependencies for API, SDK, and HTTP exporter
  • Implemented SessionExporter class to handle span exports
  • Configured TracerProvider with standard OTEL attributes
  1. Event Handling Improvements
  • Replaced manual queue-based event system with OTEL spans
  • Added better event type handling for actions and tools
  1. Deps
opentelemetry-api>=1.22.0,<2.0.0
opentelemetry-sdk>=1.22.0,<2.0.0
opentelemetry-exporter-otlp-proto-http>=1.22.0,<2.0.0

Additioanlly fixes vcrpy installing old version and erroring due to requires-python >= 3.7

teocns

This comment was marked as outdated.

Signed-off-by: Teo <[email protected]>
@teocns teocns force-pushed the otel-exporter branch 3 times, most recently from 61ec901 to 711df42 Compare November 26, 2024 03:09
delete(tests): remove conftest.py test configuration file

refactor(session): remove unused resource and tracer provider methods
Copy link
Contributor

@areibman areibman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Seems we shaved off a lot of time! Just a few minor comments and I think we're good to ship this branch to keep things modular.

We're still getting latencies of around 0.4-1s. I think we can trim this down by skipping manual flushes on end_session and start_session. But let's save that for another PR

agentops/client.py Outdated Show resolved Hide resolved
tests/core_manual_tests/benchmark.py Show resolved Hide resolved
tests/test_session.py Show resolved Hide resolved
@teocns teocns force-pushed the otel-exporter branch 6 times, most recently from 0d28c98 to 36a725e Compare November 27, 2024 04:09
Signed-off-by: Teo <[email protected]>
@teocns teocns enabled auto-merge (squash) November 29, 2024 18:54
@teocns
Copy link
Contributor Author

teocns commented Nov 29, 2024

Season two streamed in #486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants